import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

/*
 * @author zzr
 * @date: 2025/04/21  11:21
 * @description:
 */
public class IO5 {
    public static void main(String[] args) throws IOException {
        try (InputStream inputStream = new FileInputStream("./test.txt")) {

            while (true) {
                byte[] buffer = new byte[1024];
                int n = inputStream.read(buffer);
                if (-1 == n) {
                    break;
                }
                for (int i = 0; i < n; i++) {
                    System.out.printf("%x ",buffer[i]);
                }
            }
        }
    }
}
